<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %>
<c:if test="${not empty errors}">
	<c:forEach items="${errors}" var="error">
		${error.category} - ${error.message}<br />
	</c:forEach>
</c:if>

<form action="${pageContext.request.contextPath}/alunosGraduacao" method="post">
  
	<c:if test="${not empty alunoGraduacao.id}">
		<input type="hidden" name="alunoGraduacao.id" value="${alunoGraduacao.id}"/>
		<input type="hidden" name="_method" value="put"/>
	</c:if>

	<div class="field">
		Nome:<br />
	
		<input type="text" name="alunoGraduacao.nome" value="${alunoGraduacao.nome}"/>
	</div>
	
	<div class="field">
		Email:<br />
	
		<input type="text" name="alunoGraduacao.email" value="${alunoGraduacao.email}"/>
	</div>
	
	<div class="field">
		Data ingresso:<br />
	
		<input type="text" name="alunoGraduacao.dataIngresso" value="${alunoGraduacao.dataIngressoStr}"/>
	</div>
	
	<div class="field">
		Orientador:<br />

		<select name="alunoGraduacao.orientador.id">    
		  <c:forEach var="p" items="${professores}">    
		    <option value="${p.id}" ${p.id eq alunoGraduacao.orientador.id ? 'selected' : ''}>${p.nome}</option>    
		  </c:forEach>    
		</select>  
	</div>
	
  <div class="actions">
	  <button type="submit">enviar</button>
	</div>
</form>

<a href="${pageContext.request.contextPath}/alunosGraduacao">Voltar</a>
